<%@page import="com.kaishengit.entity.CarItem"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
  </head>
  
  <body>
    <h2>订单详情</h2>
    <table border="1" width="70%">
   		<tr>
   			<th>商品名称</th>
   			<th>单价</th>
   			<th>数量</th>
   			<th>总价</th>
   		</tr>
   		<%
   			List<CarItem> list = (List<CarItem>)session.getAttribute("shopCar");
   			float total = 0f;
   			for(CarItem item : list) {
   				total += item.getPrice();
   		%>
   		<tr>
   			<td><%=item.getProd().getProdName() %></td>
   			<td><%=item.getProd().getPrice() %></td>
   			<td><%=item.getNum() %></td>
   			<td><%=item.getPrice() %></td>
   		</tr>
   		<%} %>
   		<tr>
   			<td colspan="5">合计：￥<%=total %></td>
   		</tr>
   	</table>
   	<hr/>
   	<h3>配送信息</h3>
   	<form action="saveorder.jsp" method="post">
   		收货人：<input type="text" name="name"/><br/>
   		地址：<input type="text" name="address"/><br/>
   		电话:<input type="text" name="tel"/><br/>
   		<input type="submit" value="提交"/>
   	
   	</form>
   	
   	
  </body>
</html>
